﻿using UnityEngine;
using System.Collections;

public class HandMovement : MonoBehaviour {
	public enum Hand{
		LEFT,RIGHT
	};
	[SerializeField] Hand hand;
	[SerializeField] float speed = 1f;
	Vector3 moveDir;

	void Update () {
		if (hand == Hand.LEFT) {
			moveDir = MyInput.GetLeftHandMove (speed);
		} else {
			moveDir = MyInput.GetRightHandMove (speed);
		}
		transform.Translate (moveDir * Time.deltaTime);
	}
}
